package com.witte.dao;

import com.witte.entity.Customer;
import com.witte.entity.Service;
import com.witte.entity.Statitic;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface CustomerMapper {
    int deleteByPrimaryKey(Integer no);

    int insert(Customer record);

    int insertSelective(Customer record);

    Customer selectByPrimaryKey(Integer no);

    int updateByPrimaryKeySelective(Customer record);

    int updateByPrimaryKey(Customer record);

    List<Customer> selectAllCus();

    List<Customer> selectByState(@Param("beginPage") Integer beginPage, @Param("pageSize") Integer pageSize);

    List<Customer> selectByName(@Param("name")String name, @Param("beginPage") Integer beginPage,@Param("pageSize") Integer pageSize);

    int getNameCount(@Param("name")String name);

    int getRecodeCount();

    List<Statitic> selectAllCusByLevel();

    List<Statitic> selectAllCusByStatisfy();

    List<Statitic> selectAllCusByCredit();
    
    Customer selectByname(String name);

    Customer selectByNo(Integer no);
    
    String selectNameByNo(Integer no);
}